import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import './style/index.less'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

import * as echarts from 'echarts';
Vue.prototype.$echarts=echarts;

Vue.config.productionTip = false

Vue.filter('getDate',function(date) {
    let timer = new Date(date);
    let y = timer.getFullYear();
    let m = timer.getMonth() + 1;
    let d = timer.getDate();
    let hh = timer.getHours();
    let mm = timer.getMinutes();
    let ss = timer.getSeconds();
    if (m < 10) m = "0" + m;
    if (d < 10) d = "0" + d;
    if (hh < 10) hh = "0" + hh;
    if (mm < 10) mm = "0" + mm;
    if (ss < 10) ss = "0" + ss;
    return `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
  }
)


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
